package bsw.wode.entity;

/**
 * WodeGroupMemberId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class WodeGroupMemberId implements java.io.Serializable {

	// Fields

	private String groupCode;
	private String userCode;

	// Constructors

	/** default constructor */
	public WodeGroupMemberId() {
	}

	/** full constructor */
	public WodeGroupMemberId(String groupCode, String userCode) {
		this.groupCode = groupCode;
		this.userCode = userCode;
	}

	// Property accessors

	public String getGroupCode() {
		return this.groupCode;
	}

	public void setGroupCode(String groupCode) {
		this.groupCode = groupCode;
	}

	public String getUserCode() {
		return this.userCode;
	}

	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof WodeGroupMemberId))
			return false;
		WodeGroupMemberId castOther = (WodeGroupMemberId) other;

		return ((this.getGroupCode() == castOther.getGroupCode()) || (this
				.getGroupCode() != null
				&& castOther.getGroupCode() != null && this.getGroupCode()
				.equals(castOther.getGroupCode())))
				&& ((this.getUserCode() == castOther.getUserCode()) || (this
						.getUserCode() != null
						&& castOther.getUserCode() != null && this
						.getUserCode().equals(castOther.getUserCode())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getGroupCode() == null ? 0 : this.getGroupCode().hashCode());
		result = 37 * result
				+ (getUserCode() == null ? 0 : this.getUserCode().hashCode());
		return result;
	}

}